V2.8, added clear local storage and refactored main.js