cleanup and added pushstate