Move duplicated logic into single function.
Extract more redundancy
Extract yet more redundancy
Merge pull request #138 from lavalamp/master

Normalize etcd_registry's storage & error handling