Cleaned up repeated code in response comparison