for loops changed to c++0x 'auto&' style.