Finishing up the implementation and tests for the stream wrapper