Finalize the scripts.