Cleaned up dataset_metrics.py code.