Refactor UserInterface