Implement retriable helpers

Fixes #4