minor refactoring in HttpTool