The forEach() change you suggested above removes most of the dereferencing already, so I left it passing the full 'state' object for clarity.  If we do more complex highlighting later we may need access to more of the state properties anyway.