FFI cleanup