OS X fixes, Removed C++11 warnings, fixed one bug

Tested with UnnatrualCode.