Fix some mis-conversions by api_conv.pl, and remove the now-unused Xmd types