Improved http error handling, the test coverage and some cleanups
Merge pull request #52 from kudrom/fix/error-handling

Improved http error handling, the test coverage and some cleanups