Added state counter to history.pushState calls so that a state can be stored against history items