large ui refactoring