Slight simplification to LocalStorage shim