ui: started refactoring

should (still) be working