Generalized the data loader to allow multiple formats