Refactoring changes to making it easier to introduce a new data store