Changed loader to use batching