Refactor WebStorage wrapper