Factor loader into a database storer and a batch loader

these should be const at the very least. Probably should be in the a for mentioned config