Updated scripts to properly do for loops.