Change metrics so that all metrics are now classes. Also added tests for get_metric