Fix various syntax errors.

I *think* removing an entry from `_listeners` is the intent here. I checked commit history to see if I could find where `events[type]` was intro'd, hoping the change would confirm that was the case, but didn't find anything.