Miscellaneous cleanups and tweaks.