Strict mode compatibility

@dhurrell Just sticking with the convention that was there. You cant declare i twice!! We had the choice to declare outside of the loop which then removed it too far from the code, or to replace the second instance with j. That seemed to be cleanest considering what was already in place!