Split of index.js and lib/retry.js