Implemented the animation queue.