converted to xcode project and fixed tiny compiler errors