Removed concurrent modification problem.

Previously I was trying to modify a list's size while
iterating through it. This has been corrected and made more
readable.