Fixed AnimatedSprite class so that the animation now works instead of
segfaulting.  More work needs to be done, but it's better.