Refactor UserInterface.