Atomic operations and modularized code