Finalizing the initial refactoring.