Refactor weighted metrics