Second attempt at flattening submodules
Third attempt at flattening all submodules