Refactored robot and added tests
Prototype iOS8 support.
Fixed support for iOS 7 and 8.