more minor code tweaks