Restructured API result processing to utilize reusable processing routines