Reworked some parts of the dataloader
Merge