More small fixes and tweaks and cleanups.