Add transactions for import

closes #837
- added transaction handling for import
- added transactions to model functions