Several minor bug fixes and some more C# samples