Misc cleanup and tweaks