moved to the requests library for thread support.
cleaned up old api code and obsolete libraries.