Removing unnecessary submodules