Refactoring code.
Refactoring in progress.