Remove some duplication.