Cleaning up mcmc code