Refactored animation updating and reduce AnimationFrameTasks