Modified the generator

Preview of setting up the generator. 

TODO
- One step remains, feed in some workarounds for module renaming.