Refactoring: http related stuff moved to http.transport