First step towards implementing the rule in section 90.

Includes better way of applying multiple rules.