Added comments for NextDirectioner and LinesearchMethod