phanton: cleanup stream handling
Merge pull request #13 from jonathanong/patch-1

phanton: cleanup stream handling