Improved response data handling

Fixes #63