Make FFI functions private and add tests to validate.