Major speed improvement. The image generation nested loops are now replaced by a single loop with vectored operations inside. Furthermore, the data is now stored in cells. This should all contribute to speed increases in generation of images and histograms.