Essays in Corporate Finance and Machine Learning