More conventional boolean expression evaluation.

Compile expressions into conditional trees, which means unnecessary terms
will not be evaluated