Essays on the economics of inequality