Removes uneeded submodules