refactored even more stuff to Base generator class