Clean up ui.js