Stream classes, unit tests, refactoring, RDoc comments