refactored MongoAdapter to be a more generic storage class