Event dispatcher and listener library