StreamProcessor extracted. Not ideadl, but at least makes it possible to
start more focused unit testing.