Switched setInterval() to requestAnimationFrame()