Improve style…
simplify some code
show off iterators
Merge pull request #185 from nwin/master

some improvements