Refactoring and adjusting metrics accordingly