Fixed implementation to map to custom C# classes