Merge pull request #831 from narfbg/develop-user-agent

Improve the User agent library