Refactor the datapackage stuff