Three essays on firm-level heterogeneity and politics of trade