Added localstorage support