The first refactoring done. Checkpoint.