minor API response code cleanup