Cleanup of library