Connect input/output streams with duplexer. Added `to.buffer` call. Some tests working.