Added localstorage support.