Refactored code to allow for FaultTolerancePolicy and auto-retry behavior.