Update FFI definition

Most tests pass