Move HTTP related code into http module