Refactor frontend to use the new data-model