Cleanup for kernLib