Mostly minor fixes and tweaks