Use Date.now() and move var statements, var -> let for Firefox

`let` has less side-effects, as it scopes per block instead of function. As Firefox has supported it for quite some time, I see no reason why not to use `let`.