Fixes #1 Cleans up generator a bit, fixes indentation