Misc cleanup/fixes