These two vars are used pretty deeply through this code, so rename them to prevent any confusion. We also switch from a range loop to a counter so that the loop list can be changed while it's looping.
These two vars are used pretty deeply through this code, so rename them to prevent any confusion. We also switch from a range loop to a counter so that the loop list can be changed while it's looping.