StreamProvider / StreamCursor separation and protocol improvements