Load and save previous data from localStorage