Fix NameValueCollection issues

Replace with Dictionary.
Add UserAgent to ErrorEntry.