Collating vars to make jslint happy
Adding extra logging to see what happens if the link doens't show up