Minor update to factories to make more generic