ESClient refactored