Change the way http requests are handled

Threw out httplib in favour of requests library
Minor spaces fix
Added constants for default ports
minor changes to last commit

(forgot some test code in)