Single ruleset for adjacent user agents

Also touched some user agent and rule parsing.