Tiny nitpick; `var i` as `i` is not defined here. Same on line 117.