Essays on mechanism and market design