window.history.replaceState() might not exist

re #19

window.history.replaceState() might not exist in some clients. (amazon fireOS?)

TODO: if doesn't exist, should we do something else?  right now, nothing in history

I also added a few comments, since I hadn't read the JS file in a while.