Documented and further optimised heatmap.