Update for iOS 7 & optimization