Updates to #1231 - multiple event listeners

I made a few updates to your pull request. Can you check them out to see if you're ok with them and accept this pull request if you are?

The last two commits are the relevant ones.