added object for scheduling functions, added throttling with requestAnimationFrame