cmake cleanup and Sampler constructor fix