Made AnimationObject class and animation functions