Fixed requestAnimationFrame invocation error (it needs window context), minor tweaks