Moved browser name and version detection into separate function.