Refactor Slideshow to be an object. Use a pattern that allows object instantiation, for better code reusability