Added retry logic.

Fixes #40 
Commented code.