Moved scripts into history.js