Transform DiagnosticRunner.run() into a single function
Added docstrings to diagnose functions