Improvements to diagnostics.