Some optimizations and auxiliary functions.

Rewrites the if-then-else evaluation to use the binding operator; also
implements integer division, modulus and relational operations.
Updating.