Added (somewhat) graceful bug recovery.
Resolved merge conflicts.
Fixed CTD bug.