Implemented conditional event listening based on the loaded router module.