Clean up some atomic operations