Added better x/y direction traversal code.