(Define) Bugfix double rule, added equals function to AppliedRule, refactored