Improved the clean-up script.