Added method to Node: getMostProbableState + refactoring + unit tests for examples