Many changes for stream interface, including stream caching.  Fixes for devTests.