UI and code cleanup