Renamed 'state' option to 'storage' and made it accept an object with the same properties as standard web storage objects