Move the transaction stuff around a bit, no need to commit several transactions, when we can commit several items with one transaction..