Overhauled rule matching, introduced new matcher classes and rotation
class