A package of diagnostics and code fixes for refactoring.