Adds loop guards for retrying. Fixes #62. Style fixes.
Merge pull request #78 from vladikoff/fix-62

Adds loop guards for retrying. Fixes #62. Style fixes.