Moved highlighting code