Refactor structure of response array