Migration to 0.9 streams API.

Please check over particularly with respect to correctly closing the resources and shutting down the actor system.
does this work? `system` is declared below
even if it works I find it confusing