Continue FFI conversion and update tests.