MongoDb refactor.