state saving using local storage, reset logic  and updated styles