Refactor code that adds transaction to txstore into a separate function
Make sure we only add the last TxOut of created transactions as an unspent
output when that is a change output