Use var in more javascript locations