Code cleanup

Minor changes as flagged by static code analysis tools.
Reduce Garbage collection

Eliminated hidden object creation in tokenize process.