Added support for paramaterized factories