Made random walks code into a module