Factor loader into a database storer and a batch loader

I am happy to move this to config. Do we expect the config server client will have a flags-like environment?