Use STM instead of MVar in S3.hs