added test for useragent
added useragent settings + bug fixes
added history writing