Refactor syntax unicode analysis cleanups2

In addition to the cleanups1 fixes, removes a couple of sources of major memory leaks.