Tests: Fix errors in remaining unit tests.
Use semantic methods instead of fixed-width methods,
use defined type widths instead of magic type widths,
misc cleanup.