Enabling metrics
Some more progress, still very incomplete.