Remove abominable flag field.

Also update `lookupBasicType` to be nicer.
Pass word size around for correct width calculation.