More foreach loops added.