Repair and maintenance of generators