Animation much smoother now; using requestAnimationFrame