Update event_handlers.js

Greatly improved and condensed