Added Object.assign
Added CustomEvent shim
reworked event handling