Base API copied.
Initial code; no testing, no debugging, nothing.