Added 'var' to all of the for loops in the branch.

There were collisions that were making the branch do wacky stuff.