Completed the move to MongoEngine.
Fixed merge conflict and database troubles.