Changed main code for mouseover and autofilling based on event listening