Essays in the economics of crime and punishment