Refactored slideshow animation.