Added code for Metropolis-Hastings simulations.