Introduced a DSL to build RuleSet and refactor