Refactored code.
Refactored.