Read browser type from environment var, refactor.