Code style fixes
Initial version of generator refactoring