Change Format handling; add better tests.