Fix crahses from the EvtHandler

finally a functional event handling, and mostly functional  clean-up for the plugins