Transactions methods moved from controller to model