UI and code cleanup.