simple storage with optional localstorage persistence support