Clean up script detection