ElasticConnection refactoring

ElasticConnection refactoring