Finished implementation of mongo backend