Added more code for sampling with random walks and analysing results.