Improvements to generation