added in localstorage tests and fixed delete issue on persistence