Move the highlight stuff to functions.