Style tweaks, change sample_p to use internal variate generator and external RNG