User-Agent refactoring