Switched from localstorage to Storage + modified conditional