Started work on MCMC facility (again)

I'm reopening after merging in the last big batch of changes.

Working on the MCMC facility---not yet ready to merge.