Refactoring: Remove Duplicated Code