optimizations, fix MongoId handling
updating unit tests