cleanup ffi-or-ext stuff