webStorage refactor