created elasticsearchmanager as service class; moved index stats func to it