Some more work on streams, add function for manual stream decoding + example program