many minor tweaks