Fix copy-n-paste hastiness.
Rename &name -> &type.
Tweak debug output.
Make variant discriminator type customizable.