static void Main(string[] args)
        {
            Refrence Ref = new Refrence();
            Wallpaper WP = new Wallpaper();
            //Check for Help Conditions or argument overload.  If any of these conditions evaluation to yes and proceed with their execution, the end result will be the programming closing.
            if (args.Length ==0)
            {
                Ref.Help();
                //The following exit command is only used as a fallback in case the help menu returns without exiting.  This should never happen.
                Environment.Exit(0);
            }
            else if (args.Length == 1)
            {
                foreach (string arg in args)
                {
                    switch (arg.ToUpper())
                    {
                        case "/H":
                        case "-H":
                        case "/?":
                        case "-?":
                        case "/HELP":
                        case "-HELP":
                            Ref.Help();
                            //The following exit command is only used as a fallback in case the help menu returns without exiting.  This should never happen.
                            Environment.Exit(0);
                            break;
                    }
                }
            }
            else if (args.Length > 1)
            {
                if (args.Length > 2)
                {
                    Console.WriteLine("");
                    Console.WriteLine(@"Too many arguments passsed, or arguments not passed in the proper format.  Please check the help options (-h, -help, -?) for more information.");
                    Console.WriteLine("");
                    Environment.Exit(1);
                }
                else
                {
                    foreach (string arg in args)
                    {
                        switch (arg.ToUpper())
                        {
                            case "/H":
                            case "-H":
                            case "/?":
                            case "-?":
                            case "/HELP":
                            case "-HELP":
                                Console.WriteLine("");
                                Console.WriteLine("Please do not pass help switches with other switches.");
                                Console.WriteLine("");
                                Environment.Exit(1);
                                break;
                        }
                    }
                }
            }

            //If the previous checks pass, begin the primary work of the program.
            //This first "if" block sets the variables from the switches supplied in the command line.  If an incorrect switch is detected in this section, the program will detect this and exit.
            if (args.Length >= 1 && args.Length <= 2)
            {
                Wallpaper.Style style = new Wallpaper.Style();
                style = Wallpaper.Style.Fill;
                string FilePath = "";
                foreach (string arg in args)
                {
                    string s = arg.Substring(3).ToLower();
                    switch(arg.Substring(0,3).ToUpper())
                    {
                        case "/S:":case "-S:":
                            if(s == "tiled")
                            {
                                style = Wallpaper.Style.Tiled;
                            }
                            else if (s == "tile")
                            {
                                style = Wallpaper.Style.Tiled;
                            }
                            else if(s == "centered")
                            {
                                style = Wallpaper.Style.Centered;
                            }
                            else if (s == "center")
                            {
                                style = Wallpaper.Style.Centered;
                            }
                            else if(s == "stretched")
                            {
                                style = Wallpaper.Style.Stretched;
                            }
                            else if (s == "stretch")
                            {
                                style = Wallpaper.Style.Stretched;
                            }
                            else if(s == "fit")
                            {
                                style = Wallpaper.Style.Fit;
                            }
                        else if(s == "fill")
                            {
                                style = Wallpaper.Style.Fill;
                            }
                        else if(s == "span")
                            {
                                if(Version.Parse(Environment.OSVersion.Version.ToString()) >= Version.Parse("6.2.9200.0"))
                                {
                                    style = Wallpaper.Style.Span;
                                }
                                else
                                {
                                    Console.WriteLine("");
                                    Console.WriteLine("Span style is not supported on Windows 7.  Defaulting to Fill style.");
                                    Console.WriteLine("");
                                    style = Wallpaper.Style.Fill;
                                }
                            }
                        else
                            {
                                style = Wallpaper.Style.Fill;
                                Console.WriteLine("");
                                Console.WriteLine("An incorrect value for style was supplied.  The default of Fill will be used.");
                                Console.WriteLine("");
                            }
                            break;
                        case "/P:":case "-P:":
                            FilePath = arg.Substring(3);
                            break;
                        default:
                            Console.WriteLine("");
                            Console.WriteLine("An incorect switch was detected.  Please make sure you are passing the proper switches in the proper format.");
                            Console.WriteLine("You may run this program with no switches/parameters to see help options, or use /h , -help , or /? to show help text.");
                            Console.WriteLine("");
                            Environment.Exit(1);
                        break;
                    }
                }

                //If all switches are set properly, begin this section, which sets the wallpaper and style.
                if (!string.IsNullOrEmpty(FilePath))
                {
                    Console.WriteLine("");
                    Console.WriteLine("Changing wallpaper to " + FilePath);
                    Console.WriteLine("Selected style is " + "\"" +style.ToString() + "\"");
                    Console.WriteLine("");
                    WP.Set(FilePath, style);
                    Console.WriteLine("No execution errors detected. Please check your desktop to verify results.");
                    Console.WriteLine("");
                    Environment.Exit(0);
                }
                else
                {
                    char[] c = { '\'' };
                    string DefaultWallpaper = "";
                    if (File.Exists(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location.ToString()).TrimEnd(c) + @"\wallpaper.bmp"))
                    {
                        DefaultWallpaper = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location.ToString()).TrimEnd(c) + @"\wallpaper.bmp";
                        Console.WriteLine("");
                        Console.WriteLine("Changing wallpaper to " + DefaultWallpaper);
                        Console.WriteLine("Selected style is " + "\"" + style.ToString() + "\"");
                        Console.WriteLine("");
                        WP.Set(DefaultWallpaper, style);
                        Console.WriteLine("No execution errors detected. Please check your desktop to verify results.");
                        Console.WriteLine("");
                        Environment.Exit(0);
                    }
                    else if(File.Exists(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location.ToString()).TrimEnd(c) + @"\wallpaper.jpg"))
                    {
                        DefaultWallpaper = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location.ToString()).TrimEnd(c) + @"\wallpaper.jpg";
                        Console.WriteLine("");
                        Console.WriteLine("Changing wallpaper to " + DefaultWallpaper);
                        Console.WriteLine("Selected style is " + "\"" + style.ToString() + "\"");
                        Console.WriteLine("");
                        WP.Set(DefaultWallpaper, style);
                        Console.WriteLine("No execution errors detected. Please check your desktop to verify results.");
                        Console.WriteLine("");
                        Environment.Exit(0);
                    }
                    else
                    {
                        Console.WriteLine("");
                        Console.WriteLine("No wallpaper path was specified and wallpaper.bmp/jpg could not be found in the same directory. Failed to change wallpaper.");
                        Console.WriteLine("");
                        Environment.Exit(1);
                    }
                }
            }
        }