refactored the class to support better reuse when extending the class

The previous situation meant you had to copy the entire connection and configuration section if you only wanted to use a different storage adapter.
This PR allows you to create a very small factory for creating a custom adapter that extends MongoAdapter.