Moved Mongo stuff to a separate method (IS IT FINE NOW BAGNZ0R?)