Add transaction model + tests (bug 1001460)