Big cleanup and working A*. (Next: Handle pits and single stenches)