Updated for iOS7 and new ARC

Updated the code to work with the new iOS operating system.