adding unit tests for the http service and fixing a couple of minor issues that were found from them