more refactoring of txn.h