Tightened up that last one

I figured the compiler would probably be better at for loops than
whiles, and I tightened up some loose declarations.