Various fixes for OSX and to silence warnings
Merge pull request #1 from betajippity/master

Various fixes for OSX and to silence warnings