Major refactoring in transactions runner