Refactored code added some implementation of MongoAdapter