AtomicReference cleanup
Merge pull request #1634 from pveentjer/cleanup/atomicreference

AtomicReference cleanup