Cleanup and stats loading fix for YAMLDataSource
Updated YAMLDataSourceTest for stats.