Added processing of the histogram and diagnostic messages