Refactored the HTTP Collect solution code.