Cleaned up Markov_chain_generator slightly.