Handle any possible combination of bit-widths and offsets [978].

Fixed the quick and dirty stuff.