builds on OS X 10.9, Xcode 5.1
fix project setup to run on 10.9
fix format warnings
fix more warnings and possible problems
change prototype to match changes