Import atomically from Control.Concurrent.STM, which is already used.
Arrange modules in the standard hierarchy.
Split out networking. Make the world polymorphic.