Completed the refactoring. Testing.