Backtracking is now functional.

One backtrack run can be done, and stops are handled correctly. Look
into infinite runs.