UI tweaks and code cleanup