Refactoring. Changing the way of processing "CheckAll" option