Modified the internal handling for `inTransaction`.
Implemented and simplified the internal queue code.