Small optimization of AND and OR components