Refactored slideshow example.