Made a number of changes to the memory structure for image processing.