Essays in market design and behavioral economics