Improved chunk streaming, and some fixes.