Added routine to process each slide.