Rearrange things and work on chunked output