HTTP class refactored