Rule Operator Class

This requires heavy scrutiny, as I'm sure I've done stuff wrong and made mistakes. But it's at least a start on the rule operator class.