simplify and reduce duplication in syntax highlighter code
more comments in syntax highlighter code