Attempt at a submodule generator

I don't think this solution is complete, but at least it eased my lazyness!