Cleaning up some strange looking for loops.