More refactoring of mongo classes