Add redo that doesn't quite work. Add chain dump for debugging. Cleanups.