Clean up payload type-detection