remove unused code in ui.js