Fixed various M3 library breaking changes.  Upgraded event handler code to use streams