Split markov logic from script that pulls everything together.