Adding an ELASTICSEARCH_PORT env variable and minor refactor.

Here's a full PR of the changes I made along with adding an `ELASTICSEARCH_PORT` env variable. 

Fixes #1 

Thoughts?