Move user agent building to separate class.