refactoring ruleModel into individual modules