Added more OS X stuff and fixes