Merge pull request #10919 from SmithSamuelM/sam_raet_15

Sam raet 15 Some refactoring in preparation for more reliability in transactions