Moved Markov Model into workflow training parameters. Fixed various memory leaks.