Lots of bug fixes and C# function calls are now working properly