local storage data code clean up