Refactor: Use more JavaScript-y ways to mod array

Use Array.push and .shift to maintain our list of
<count> timestamps. Remove the code based on
'currentIndex,' which was a bit indirect.

Use the length of our timestamps list to determine
if we're at the first beat.

Also, fixed the debug stuff to a) have a button, and
b) fixed a typo introduced on the initial commit.