Transactions Example

Adds an example for transactions, also fixes nasty bug in parameter preparation