Further work on data marshalling and corresponding tests.