Optimizing - use vars instead of IsChecked()

Optimizing - use vars instead of IsChecked()