Some refactorizations.