Clean up xgmml loader. improve the regression test.