Ui refactoring