Starting to fix and refactor the data controller to prepare place for metadata tab.