Fix unit tests
Add urllib3 requirement
More unit and pep8 fixes