Refactors the API for create_dataset