Small fixes

Small misc fixes and cleanups