Condensed duplicate code.