Implemented persistent variables, to pass data between animation frames.