Convert MarkovChain into a package