Fix pi assign in mcmc batch analytic. Slight refactors.