Merge remote-tracking branch 'upstream/dev' into markov
Some minor changes in doc and function definations
Merge branch 'markov' into dev