Refactored for adding the HTTP client