WIP on ckan refactor