Rewrite highlighter code and refactor classes