Refact retry service implementation.