A bunch of minor fixes.