added RuleTypes to remove instaceof calls and make specifying what rules
Added RuleType to help with generating rules and remove instanceof
calls.