Updates towards working version on OSX