Added JS for local storage and templating