Cleaning up after a script