Port to Mac OXS (mosft of the app is now working fine on mac osx and all the tests are now passing)