Extracted mongo impl from datastore.