Switch setTimeout to requestAnimationFrame

[Issue #5]