Updates for iOS 7 and Refactoring