More work on a new sampling framework.