Moved listening to global events to "run" function