Improvements to the generator