remove unused code in ui.