Replaced `timeout` with `requestAnimationFrame`

* Increases performance drastically