Updated from Iterators to Streams in an attempt to fix empty exception.