Cleaned code; began work on second-order markov chain