Refactor collection parser

Replace a linear search with a lookup table to parse the request.

Remodel the rule.var.opts table to accomodate the change.