Refactored code dealing with communication between MainForm.cs and MPlayer.cs