Improved MainForm.cs