Refactor data model and json.
wip