Fix optimization bug. Remove Java support and add C# support.