Implemented wrapper for localStorage and sessionStorage.