lots of minor tweaks