Refactored out the parse_response_headers method