minor tweaks and tidying