Add transaction processing function

This PR adds a preliminary version of the function which processes transactions.
Targets #240.
"Could" or "Couldn't"?