Cleanups and C# generator