Cleaned up the C# to make sure it opens and exits without hassle.