TOON: Remove double identical check.
TOON: Reduce the scope of a couple of variables.