Worthless booleans removal