Update factory syntax to use traits rather than a sub-factory