Cleanup phase 1
Cleanup phase 2

Changed for-each to iterator