Refactor TextChunkHighlighter.
Minor refactoring.