some clean up, bugfixes and made the "stats" event always emit even with PUT streams and with a lot more stats