Fixed GitHub issue #2
StreamClient error handling.
Internal cleanups.