Make EventHandler use shared_ptr and make it possible to use event lists