Get FFI callbacks working again; cleanup