Refactor datastore

DO NOT MERGE.

These are the configuration and (small) interface changes for the datastore layer refactor.