Added a factory for data loaders