Refactored support for iOS 5 & 6

I merged the useful additions from leverdeterre which add support for iOS 5 and 6.
Some adjustments have been made to keep consistency in naming and keep a clean user interface for demo app on iOS < 7.0