Separate API and implementation.