Adding history.js functionality