Refactor/multipart stream