Updating highlight function

Refactored the highlight function and function used to get the xpath to the element. Also added a second optional parameter that sets the time the elements will be flashing/highlighted in seconds.