Sorry, going to do a little nitpicking.

Can you move the declaration of this var up into the list above and then set its value here if necessary?