Rename InstanceStateFactory to something more appropriate.