[refac] modified event dispatcher so handlers are easier to use