Finished API and hooks.