Split main module into submodules.