More refactoring and simplification of multipart streaming.