Added error handling and reorganized business logic to conform to API Documentation
Merge branch 'master' of https://github.com/im420blaziken/riot-objc