Build infrastructure for merging streams.

Need to write a sessioniser, then this should hopefully work.