some cleanup of the generator