Beginning to refactor generators