Implement stream module with some testing