cleanup .NET and fix bugs