Refactoring Rule and removing CustomRule