Adding history#pushstate functionality