Implemented a RuleIndex for efficient rule searching - tests needed