Modernizes the loops themselves while also getting rid of a signed/unsigned comparison in a loop condition.