Get rid of some duplication.