Mutex these loops as they can interfere with other threads
Refactoring some code to make fixing some bugs easier. Moving code from
the MyOrders class to the TransactionManager classes where it belongs.
Code completely untested.