Refactoring for XCode 5

As an iOS 7 widget, the code can expect XCode 5