Extracted rule semantics into a class.