Big step to refactoring the generators into a functional style