Improved response parsing