Edits so that event loops extend evenement and can emit error events.
Added code to emit error events on the event loop as well as on local
emitters.