Added unit tests
Fix DataIterator to return sensible <to>