Elastic search repo on progress and some refactorings