Essays on human capital heterogeneity and agglomeration