Added parsing of responses into an array and updated tests