iOS 7 rotation fix and compatibility
A bit of code improvement, note the unwrapping.
WIP trying to fix unit tests code