some minor code cleanup