Implemented stream pool to avoid unnecessary allocations (close #15)