Refactored Metrics module