Some more refactoring of metrics