reorg and added elastic search support