Add multi transaction support

@TheNeikos please review.