Three essays in the economics of education