Fixed the repeated code issue. Now there is only one highlighting function.