Major improvements to failure handling.