More work on streams, but not quite working yet.