Refactor and simplify the resilient transport