Refactor HTTP State