Major refactor of ESClient, minor updates elsewhere. Needs documentation now.