Using enumerate instead of for i loop.

@rnystrom are you open to style changes? For example, I find `enumerate` to be easier to read than the `for var i` version.

If you do like the `enumerate` method I can update the other for loops where it makes sense.

I'll let you/team decide.