Code UI refactoring