A bunch of minor tweaks and fixes.