Made some changes to local storage of data