Introducing the StreamingCodec interface

Also includes some clean up and some utils
2014