Factor out href extraction and string conversion

Closes #6
Fixed syntax error in App.elasticsearch_url()

Closes #7, Fixes #6

/cc @ichthyos
Merged upstream changes.