Refactor to pass linting.
Monkeypatch pushstate to fire an event.
Return boolean from recognize function.
Fix commas and semicolons.
Deal with replaceState as well.