Reverted back to requestAnimationFrame version of animation