Misc fixes/cleanup