Improved http error handling, the test coverage and some cleanups