refactored Elastic Search classes - HTTP responses are now generated and consumed for proper error handling