Replaced string-based DerivationState signature with proper hashCode() and equals()
Made Rule into a class instead of interface, rolled RuleMethods into it