Moving Mongo code to the mongo backend, where is supposed to be.