UI changes and refactoring