Change code organization
Restructure code and generator