Refactor for loop methods

Use for-each loops instead or use the collection length inside your for
loop