Major rework of the image manager.