Factor loader into a database storer and a batch loader

Wary of this line, it seems we do not have a case where error can be anything other than nil. So either, we do not need to return error or we're not handling an error case.