Fix unused variable, precedence, and iOS 7 deprecation warnings