Cleaned up multipart transmitter code a bit, fixed a chunk-related connection issue