major reorganization: generify channel, extract out bichannel, add notion of stream (newtype for type classes)