Added ability to specifiy custom constructor variables for factories