refactor rule config manager