Cleanup API.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>