Give API collections direct references to the backend.

This is instead of passing lib and ffi directly.