Completely reworks rules core.