Rewrote rewrite_exceptions().
Fixed bit-vector tests.