Add initial tests.
Add ability to write to streams.
Add test cases.
Update tests.