gui tweaks and code cleanup