Change the way http requests are handled

Threw out httplib in favour of requests library
Minor spaces fix
minor changes to last commit

(forgot some test code in)