Refactored transaction ordering