Cleanup fn.