comments, declaration clean up, used immutable list as iterator snapshot