Change WithState to use named constructors instead of a parameter.