Make FFI functions private and add tests to check that.