- Refactored code into methods.