Force all SQL commands to go through a transaction

And also our serialize logic!