Merged two methods to one.  Still need to finish conditional formatting.
Added logic for existing APIs that the iOS SDK supports.

Addressed a security vulnerability where SSL calls (not working yet) could be subjected to a man-in-the-middle attack.

TODO: get SSL working properly