MongoDB: continued refactoring