Refactoring function for cleaning collections.
Changing method names of mongo handler. Minor refactor.