Merge pull request #77 from csmith/master

Tidy up highlight calculation.
More highlight tidying.