Massive UI refactoring