Refactored Code!