Generators refactored