Cleanups of Event (thread) code