MongoDB helpers refactoring