Move UI stuff out of transformer.js