DiagonalHeatmap and code cleaning