Streaming: rework interface and fix copy issues
Rework cast interface