Cleanup for libraries.