Essays in microeconomic theory and the economics of networks