Change the arguments to the Minimum function.
Rename 'typeSwitch' function to 'normalizeType'.