Further reduce code duplication.