Updated for Xcode 5 and iOS 7