tidy up iterators, java 8 compatibility.