iOS 7 Compatibility & code clean up