Move response parsing to correct place