Move Mongo calls from views into model