Maintenance and repair of generators