Refactor UI.