Use global events to register modules