Move common logic of complex rules to a base class