Markov chain is now stored and used as a class rather than a tuple.