More refactoring to make generic methods for mongodb collection mgmt