Improve crash and recover tests; fix bugs and hangs.

closes #7