Refactored HttpProxy.