Refactored version of the failing DataLoader

includes and supersedes PR #851