Added missing calls to finalize
Removed redundant size write (that also was wrong)
Store the sourceName + some cleanup
uint8_t* input for sendStream

There was a bug inside sendStream to figure out which size to send and it uses some masks to mask out some upper bits that shouldn't be included in the size and doing those ops on signed values caused the size to sometimes be negative