Refactor UX code to new scope setup.