Refactoring and code reorganization.