Api lib cleanup