Refactored the AnimatedSprites demo