Added transactions to decrease insert time