Added old markov code, not actually using it yet.