Events cleanup
Merge branch 'master' into bugfix/flash-to-js-event-order