Refactor + change rulesGrid