User agent

Jeff,

Proposed fix for making user_agent a required new() parameter in a future release. Sorry for the sloppy branching; this pull request includes the closure fix from my previous pull request as well.

Cheers,

Daniel