Refactoring 'PortableUserAgent'