Hunt ternary operators
Use the ?: syntax to simplify assignments.
Cast to boolean values extracted from tables.