Move requestAnimationFrame to module