generate module with submodules using package folder structure