Refactored POJO creation for Metric and MetricDataset & other assorted changes