UI tweaks, code cleanup