Summary: The third chapter, which is joint work with Andr'es Rodr'iguez-Clare and Moises Yi, develops and applies a framework to analyze the effect of trade on aggregate welfare as well as the distribution of this aggregate effect across different groups of workers. The framework combines a multi-sector gravity model of trade with a Roy-type model of the allocation of workers across sectors. The model predicts unequal distribution of the gains from trade as labor demand increases (decreases) for groups of workers specialized in export-oriented (import-oriented) sectors. The model generalizes the specific-factors intuition to a setting with labor reallocation, while maintaining analytical tractability for any number of groups and countries. We bring the model to the data using China's growth as a trade shock, where we define groups as German regions. First, we show that the model's structure accurately captures the empirical changes in regional income due to the China shock. Second, we structurally estimate the model's parameter that governs the distributional effects of the model. Counterfactual simulations show that this parameter implies sizable distributional implications of trade, with several groups losing from free trade. Finally, we measure the "inequality-adjusted" welfare effect of trade, which captures the full cross-group distribution of welfare changes in one measure. We find that inequality-adjusted gains from trade are larger than the aggregate gains for both countries, as between-group inequality falls with trade relative to autarky. Importantly, the opposite happens for the China shock.