lib cleanup