Type bit sizes added; casts improved; tests updated.
updated error tests (19); plus fixes