refactor - highlighting is no longer slow for thousands of lines