getting pushstate functionality in place, extracting nav js