Change the parameter order of setEventHandler so we can easily
add more event handlers using Kleisli composition
Restore to the old example
setEventHandler is pure. we don't need the IO monad.
It's a bad idea to directly expose 'setEventHandler' to the user
since it might fail if you supply it the wrong string. Instead we
expose events from which we know they work.