Attempting some optimization.
Some cleanup.
Fixed crash related to unicode characters.