Update to use more flexible sampler.