[LPM] Cleanup some loops to be range based for loops before hacking on