ui.js overhaul