Moved type override code into a new class.