Improve structure of generator class - break up large methods