mac fixes and cleanups