- Refactored code slightly.