EsHistogram added and refactored