Http refactor