Add description and epilog to help message
Flatten main loop
Fix reuse of direction var

And be more efficient by breaking out of the direction check loop when
one possible move has been found.