Changed event handling to use thread pools and catch throwables.