Slight cleanup for adding authorization and user agent headers.