Create a stream base class.

Closes #3.