Added support for listening to factory events