Move mongoose dependency to submodules