Made some changes to the js file to make local storage work.