refactor eventhandler
drop eventHooks var from eventhandler
minor tweaks