Replacing Collection with Set
Removing unused imports
Injecting rules parameters