<Window x:Class="MLSFileTrimmer.Window1"\r
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
-    Title="MLS File Trimmer" Height="200" Width="600" MaxHeight="Infinity" MaxWidth="Infinity" MinHeight="0" MinWidth="0" ResizeMode="CanMinimize">\r
+    Title="MLS File Trimmer" Height="200" Width="600" MaxHeight="Infinity" MaxWidth="Infinity" MinHeight="0" MinWidth="0" ResizeMode="CanResize">\r
     <Grid Background="Silver">\r
-        <Label Margin="20,30,30,0" Name="label4" VerticalAlignment="Top" Height="30">Please specify the directory where the MLS csv files are.</Label>\r
-        <TextBox Margin="20,70,130,60" Name="outputDirtextBox" FlowDirection="LeftToRight" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" TextWrapping="NoWrap" Height="30" />\r
-        <Button Margin="0,70,20,61" Name="outDirButton" HorizontalAlignment="Right" Width="100" Height="30" Click="outDirButton_Click">Browse</Button>\r
-        <Button Margin="0,0,20,20" Name="parseButton" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="100" Height="30" Click="parseButton_Click">OK</Button>\r
-        <Label Height="28" HorizontalAlignment="Right" Margin="0,27.233,20,0" Name="finishedLabel" VerticalAlignment="Top" Width="100" FontSize="16" Foreground="Red" HorizontalContentAlignment="Center" Visibility="Hidden">Finished!</Label>\r
-        <Label Height="28" HorizontalAlignment="Right" Margin="0,27.233,20,0" Name="trimmingLabel" VerticalAlignment="Top" Width="100" FontSize="16" Foreground="Green" HorizontalContentAlignment="Center" Visibility="Hidden" >Trimming...</Label>\r
+        <Grid.RowDefinitions>\r
+            <RowDefinition Height="1*"/>\r
+            <RowDefinition Height="1*"/>\r
+            <RowDefinition Height="1*"/>\r
+            <RowDefinition Height="1*"/>\r
+        </Grid.RowDefinitions> \r
+        <Grid.ColumnDefinitions>\r
+            <ColumnDefinition Width="80*"/>\r
+            <ColumnDefinition Width="20*"/>\r
+        </Grid.ColumnDefinitions>\r
+        \r
+        <Label Grid.Row="0" Grid.Column="0" Margin="5,5" Name="label4" VerticalAlignment="Center" >Please specify the directory where the MLS csv files are.</Label>\r
+        <TextBox Grid.Row="1" Grid.Column="0" Margin="5,5" Name="outputDirTextBox" FlowDirection="LeftToRight" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" TextWrapping="NoWrap"/>\r
+        <Button Grid.Row="1" Grid.Column="1" Margin="5,5" Name="outDirButton" Click="outDirButton_Click">Browse</Button>\r
+        <Button Grid.Row="2" Grid.Column="1" Margin="5,5" Name="parseButton" Click="parseButton_Click">OK</Button>\r
+        <Button Grid.Row="3" Grid.Column="1" Margin="5,5" Name="exitButton" Click="exitButton_Click">Exit</Button>\r
+        <Label Grid.Row="0" Grid.Column="1" Margin="5,5" Name="finishedLabel" FontSize="16" Foreground="Red" Visibility="Hidden">Finished!</Label>\r
+        <Label Grid.Row="0" Grid.Column="1" Margin="5,5" Name="trimmingLabel" FontSize="16" Foreground="Green" Visibility="Hidden" >Trimming...</Label>\r
     </Grid>\r
 </Window>\r
 
 using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
+using System.ComponentModel;\r
+using System.IO;\r
 using System.Text;\r
+using System.Threading;\r
 using System.Windows;\r
-using System.Windows.Controls;\r
-using System.Windows.Data;\r
-using System.Windows.Documents;\r
-using System.Windows.Input;\r
-using System.Windows.Media;\r
-using System.Windows.Media.Imaging;\r
-using System.Windows.Navigation;\r
-using System.Windows.Shapes;\r
-using Microsoft.Win32;\r
-using System.IO;\r
-using FolderBrowserDialog = System.Windows.Forms.FolderBrowserDialog;\r
-using System.Xml.Serialization;\r
 using System.Xml;\r
+using System.Xml.Serialization;\r
 using Ionic.Zip;\r
-using System.ComponentModel;\r
-using System.Threading;\r
+using FolderBrowserDialog = System.Windows.Forms.FolderBrowserDialog;\r
 \r
 namespace MLSFileTrimmer\r
 {\r
             openFolderDialog.RootFolder = Environment.SpecialFolder.MyDocuments;\r
             if (openFolderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)\r
             {\r
-                outputDirtextBox.Text = openFolderDialog.SelectedPath;\r
+                outputDirTextBox.Text = openFolderDialog.SelectedPath;\r
                 currentDirectory = openFolderDialog.SelectedPath;\r
             }\r
         }\r
         private void parseButton_Click(object sender, RoutedEventArgs e)\r
         {\r
             // make sure the directory exists\r
-            if (outputDirtextBox.Text.Equals(String.Empty))\r
+            if (outputDirTextBox.Text.Equals(String.Empty))\r
             {\r
                 MessageBox.Show("Please select the correct output directory.");\r
                 return;\r
             }\r
-            else if (!Directory.Exists(outputDirtextBox.Text))\r
+            else if (!Directory.Exists(outputDirTextBox.Text))\r
             {\r
-                MessageBox.Show(outputDirtextBox.Text + " does not exist. Please select the correct output directory.");\r
+                MessageBox.Show(outputDirTextBox.Text + " does not exist. Please select the correct output directory.");\r
             }\r
 \r
             // make sure the original files exist\r
             this.trimmingLabel.Visibility = Visibility.Hidden;\r
             this.finishedLabel.Visibility = Visibility.Visible;\r
         }\r
+\r
+        private void exitButton_Click(object sender, RoutedEventArgs e)\r
+        {\r
+            this.Close();\r
+        }\r
     }\r
 }\r