Fill rules section + refactoring