Pull retry functionality out into a separate package