updated div target logic and updated link template