minor code cleanup tweaks