Added clientside test for stream plugin

Fixed some bugs in stream plugin

Closes #384