Defining AnimationFrame and Animation Classes.