Add more comments to countWalks, and do the clean up