Made ball variable global, since there is only going to be one. Animations now uses window.requestAnimationFrame. closes #3