Replace Iterator with IteratorAggregate
Update toArray
Fix test