Added compareAndSet to Storage to give similar functionality as Atomic.