Added retry_time and improved mapping management.