Reduce code duplication a bit more. NFC.