refactored some transaction context handling into its own class