moved requestAnimationFrame into its own file. removed dead code