generator refactoring...