Refactored local storage persistence approach