Fix XCode 5.1 warnings and errors