refactored initial save for transactions
Merge pull request #7 from N1kw/refactor-transaction

Refactor transaction