Moved res/lib/ui.js to legacy/ui.js