Modified to shuffle directions to avoid unbalanced search.
Merged master branch.