Double user-agent testing
Fix to issue 57
Code cleanup
Merge pull request #58 from GoodDragon/double-user-agent

Fix to issue 57