Refactoring to make the list of built-in metrics open-ended.