Refactor data_loader to use promise chains