Added timer and logic to control slideshow