Remove unused code in UI