Cleanup compiler warnings. Small changes for OSX