Consolidate parse* functions in parseResponse() function