Revert "Merge pull request #11 from LegNeato/master"

This reverts commit 0cffe8d84ff08c0e92e42d0deb52555f5189d342, reversing
changes made to 1d6d2860f7dbff37f859a976886e9425a48bfcf8.
Fixed stream reading