Small fixes
Used more iterators