Fix warning
Fix merge conflict
Refactor for iOS 6 and 7 support