Refactored the Response handler to work with batch requests