Simplify custodian task code.