Factor loader into a database storer and a batch loader

will make this more explicit.