added a reset button and changed saving to local storage only on page unload