Metrics bug

Refactoring to handle Seth's changes to the metrics code