Attach the event dispatcher