Updated for ARC. Tested with Xcode 5 / iOS 7.