Simplify characterCode lookup

Reduce String.fromCharCode that can’t be optimized by the minifier.
Combine single path conditional
Remove unused variable

It is only set to empty then passed