converting detach methods from public to private
TODO updated.
Refactored the way methods iterate through event listeners.
capturing any errors on triggering events.