More tests and added the number_types flag.
Added badrg clause for decoding.