There are some TODOs in the code where we haven't wrapped some db operations in transactions, which we should.