Add a cache for rules/dictionaryRules
Smarter approach for getMatchingRules

Also replaced a "if ... or ... or ... " cascade with a switch statement
Compile the stack to a javascript function
Cache the index/position of the MOM Node in its parent.

Instead of linearly seaching for it on every request.