Configurable retries and Logging

Each commit is Atomic, but they really *should* go together.  See commit messages for explanation of changes.

Fixes #22