Rework the stream for allowing asynchronous processing with servlets
Reorg unit tests