Implements generic alias handling code.
