Improved keyframe animation