Documentation changes as per comments in PR; fixed problems with python 3; use a seed in tests with random numbers