Refactor the UI.