Refactored the UI with the new data structure