Modified module generator to create submodules
Attempt at documenting something