Attempt to make highlight functions more similar
Not very successful attempt. The functions are similar but I was unable to pull out a generic construct without more work than the few lines of code seemed worth.