started working on markov module, various other changes