Finish API and tests.