diagnostic, corrections, cleanup