Fix bug with iterator invalidation.
Textual cleanup.